package ReadLine;

import java.util.Scanner;

/**
 * @author: lwg
 * @Date: 2022/2/13 22:08
 * @Description: 读取多行数据
 *     3
 *     1 2 3
 *     2
 *     1 1
 */
public class demo1 {

    public static void main(String[] args) {
        /*Scanner input = new Scanner(System.in);
        int lent = input.nextInt();
        int[] arr = new int[lent];
        for (int i = 0; i < lent; i++) {
            arr[i] = input.nextInt();
        }
        for (int k : arr) {
            System.out.print(k + " ");
        }*/

        /*Scanner in = new Scanner(System.in);
        int a, b;
        while (in.hasNextInt()) { //除特别说明外，OJ 题目一律采用多组输入
            a = in.nextInt();
            b = in.nextInt();
            System.out.println(a + b);
        }*/
        Scanner in = new Scanner(System.in);
        int n = 3;
        int m = 2;
        int N = 0;
        int M = 0;
        int[] g = new int[n];  //孩子的胃口
        int[] s = new int[m];   //饼干的尺寸
        while (in.hasNextLine()) {
            N = in.nextInt();
            for (int i = 0; i < n; i++) {
                g[i] = in.nextInt();
            }
            M = in.nextInt();
            for (int j = 0; j < m; j++) {
                s[j] = in.nextInt();
            }
            break;
        }
        System.out.print("N--" + N+"\n");
        for (int ch : g) {
            System.out.print(ch + " ");
        }
        System.out.print("\n");
        System.out.print("M--" + M+"\n");
        for (int c : s) {
            System.out.print(c + " ");
        }
    }
}
